<script>
import BaseConsumeItem from './BaseConsumeItem'
import ConsumeMixinItem from './ConsumeMixinItem'
export default {
  extends: BaseConsumeItem,
  mixins: [ConsumeMixinItem],
  data() {
    return {
      iconUrl: require('../../assets/wallet_balance.png')
    }
  },
  // watch: {
  //   state(newValue, oldValue) {
  //     switch (newValue) {
  //       case 0: // 待支付
  //         // this.iconStyle = 'baseBgColorNoActive'
  //         // this.descStyle = 'baseColorNoAcitve'
  //         this.desc = '待支付'
  //         break
  //       case 1: // 成功：消费-渠道成功；充值-渠道成功，充值成功
  //         // this.iconStyle = 'baseBgColorNoActive'
  //         this.desc = this.price
  //         break
  //       case 2: // 失败：渠道失败
  //         // this.iconStyle = 'consume-fail-icon'
  //         // this.descStyle = 'consume-color-999'
  //         this.desc = '充值失败'
  //         break
  //       case 3: // 处理中：渠道处理中
  //         // this.iconStyle = 'consume-fail-icon'
  //         // this.descStyle = 'consume-color-999'
  //         this.desc = '充值中'
  //         break
  //       case 4: // 渠道成功，充值处理中
  //         // this.iconStyle = 'consume-fail-icon'
  //         // this.descStyle = 'consume-color-999'
  //         this.desc = '充值中'
  //         break
  //       case 5: // 渠道成功，充值失败
  //         // this.iconStyle = 'consume-fail-icon'
  //         // this.descStyle = 'consume-color-999'
  //         this.desc = '充值失败'
  //         break
  //       case 9: // 取消
  //         // this.iconStyle = 'consume-fail-icon'
  //         // this.descStyle = 'consume-color-999'
  //         this.desc = '交易关闭'
  //         break
  //     }
  //   }
  // },
  methods: {
    setStateDesc() {
      switch (this.state) {
        case 0: // 待支付
          this.desc = '待支付'
          break
        case 1: // 成功：消费-渠道成功；充值-渠道成功，充值成功
          this.desc = this.price
          break
        case 2: // 失败：渠道失败
          this.desc = '充值失败'
          break
        case 3: // 处理中：渠道处理中
          this.desc = '充值中'
          break
        case 4: // 渠道成功，充值处理中
          this.desc = '充值中'
          break
        case 5: // 渠道成功，充值失败
          this.desc = '充值失败'
          break
        case 9: // 取消
          this.desc = '交易关闭'
          break
      }
    }
  }
}
</script>
